<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script type="module">
        import { reactive, effect, computed } from './reactivity/index.js'
        const product = reactive({
            name: 'iphone',
            price: 50000,
            count: 3
        })
        let total = computed(() => {
            return product.price * product.count
        })

        console.log(total.value)

        product.price = 4000
        console.log(total.value)

        product.count = 1
        console.log(total.value)
    </script>
</body>

</html>